<template>
  <div class="box">
    <div class="box-header">
      <div class="title">{{ props.title }}</div>
      <div class="desc" v-if="props.isDesc">
        <span class="l">Top5</span><span class="inner"> | </span><span class="r">Bottom5</span>
      </div>
    </div>
    <div class="body"><slot></slot></div>
  </div>
</template>
<script setup>
import { defineProps } from 'vue'
const props = defineProps({
  title: {
    type: String,
    default: '标题',
  },
  isDesc: {
    type: Boolean,
    default: false,
  },
})
</script>
<style lang="scss" scoped>
.box {
  width: 462px;
  height: 275px;
  .box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 50px;
    padding-left: 40px;
    padding-right: 25px;
    background-image: url(@/assets/images/deliver/box-header-bg.png);
    background-size: cover;
    .title {
      font-family:
        Source Han Sans CN,
        Source Han Sans CN;
      font-weight: bold;
      font-style: normal;
      font-size: 26px;
      color: #ffffff;
      line-height: 50px;
    }
    .desc {
      font-family: Roboto, Roboto;
      font-size: 20px;
      font-weight: 500;
      .l {
        color: rgba(255, 133, 116, 1);
        // text-shadow:
        //   inset 0px 0px 6px rgba(255, 255, 255, 0.25),
        //   0px 2px 6px rgba(251, 169, 169, 0.2);
        // background: linear-gradient(90deg, #ff8574 0%, #d54b38 100%);
      }
      .inner {
        display: inline-block;
        width: 1px;
        height: 24px;
        margin: 0 6px -6px;
        background: linear-gradient(
          to bottom,
          rgba(255, 255, 255, 0),
          rgba(255, 255, 255, 1),
          rgba(255, 255, 255, 0)
        );
        overflow: hidden;
      }
      .r {
        color: rgba(226, 67, 9, 0.5);
      }
    }
  }
  .body {
    width: 100%;
    height: 230px;
    background: radial-gradient(0% 62% at 94% 46%, #232221 1%, rgba(54, 54, 54, 0.64) 100%);
  }
}
</style>
